    package KatPhTests;

import Rout.GoBefore;
import org.testng.annotations.*;
import org.openqa.selenium.net.PortProber;

public class KatMagnet {

    private GoBefore browser = new GoBefore();     
                
    @BeforeMethod
    public void setUp() throws Exception {   
        
        System.out.println("\n Run test: " + getClass().getSimpleName());
        
        browser.setXpFilename("//*[@id=\"torrent_once_upon_a_time_s04e039700455\"]/td[1]/div[2]/div/a/strong[1]");
        browser.setCurURL("https://kickass.to/search/once%20upon%20a%20time%20s04e03/");
        browser.setClButton("partner1Button idownload icon16"); 
        browser.setCssButton("#torrent_once_upon_a_time_s04e039700455 > td:nth-child(1) > div.iaconbox.center.floatright > a.partner1Button.idownload.icon16"); // css of mini button
        browser.setXpButton("//*[@id=\"torrent_once_upon_a_time_s04e039700455\"]/td[1]/div[1]/a[3]");
        browser.setLpurl("getsecuredfiles");
        browser.setRepDir(getClass().getSimpleName());
    }        
            
    @Test
    public void MagnetButton () throws Exception {                    
        
        browser.setUp();         
        browser.testRun();
        browser.lpDetect();
        browser.verFilePresent();
        browser.verFilename();
    
    }
    
    @AfterMethod
    public void ThearsDown() {
        browser.getDriver().quit();      
        
    }
    
}
